><

Adding head scripts



You can use the Script tag to add a JavaScript to the head section of your Web page. A script in the head section is executed while the visible body section of the page is still being loaded. For information on JavaScript and the JavaScript Editor, see Using JavaScript.

To add a head script:

1 Click the triangle () next to the Page icon () in the upper left corner of the document window to open the head section pane of your document window.

2 Choose Window > Objects.

3 In the Objects palette, click the Head tab ().

4 Drag the Script icon from the Objects palette to the head section pane of your document window.


5 Choose Window > Inspector.

6 In the Head Script Inspector, for Name, enter a name for the script.

7 Select a browser from the Language pop-up menu. The JavaScript dialect for the browser appears in the text box below the pop-up menu.


Select from Language pop-up menu.

8 Select Source. Then select a script file using the Point and Shoot button (), or the Browse button.

9 Click Edit to open the JavaScript Editor and edit the script file.


Setting Up Pages > Adding head scripts